package com.springbootmybatisplusenum.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Data;

/**
 * @Classname SexEnum
 * @Description TODO
 * @Date 2022/5/30 17:59
 * @Created chenjian
 */
public enum SexEnum implements IEnum<Integer> {

    MAN(1, "男"), WOMAN(2, "女");

    private int value;
    private String desc;

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.desc;
    }

}

